package entity_controllers.options;

import ie.FieldBoard;
import ie.PlayerBoard;
import ie.Shaker;
import dto.Player;
import dto.PropertyField;
import entity_controllers.Option;

public class BuyOption extends Option {

	public BuyOption(String title) {
		super(title);
	}

	@Override
	public void execute(Player player, FieldBoard gameBoard, PlayerBoard playerList, Shaker shaker) {
		Player[] players = playerList.getPlayers();
		Player[] validPlayers = new Player[players.length];
		int c = 0;
		for (int i = 0; i < players.length; i++) {
			if (players[i].getAccount().getNumberOfFields(PropertyField.class) > 0) {
				validPlayers[c] = players[i];
				c++;
			}
		}
	}

	@Override
	public void reset() {}

}
